<%= form_for(@rating) do |f| %>

  <% if @rating.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@rating.errors.count, "error") %> prohibited this rating from being saved:</h2>

      <ul>
      <% @rating.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :comment %><br />
    <%= f.text_field :comment %>
  </div>
  <div class="field">
    <%= f.label :notToBeChanged %><br />
    <%= f.text_field :notToBeChanged %>
  </div>
  <div class="field">
    <%= f.label :toBeChanged %><br />
    <%= f.text_field :toBeChanged %>
  </div>
  <div class="field">
  <table border="1">
    <tr>
      <td>Question</td>
      <td>Stars</td>
    </tr>
    <% @rating_questions.each do |rating_question| %>
      <%= f.fields_for :rating_question_results do |builder|  %>
        <%= render 'rating_question_result_fields', :f => builder, :rating => @rating, :rating_question => rating_question %>
      <% end %>
    <% end %>
  </table>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
